import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: true,
    addBtnText: '新增',
    editBtn: true,
    delBtn: true,
    viewBtn: true,
    searchLabelWidth: 120,
    column: [
      {
        label: '核查对象',
        prop: 'p1',
        search: true,
        overHidden: true,
      },
      {
        label: '核查对象编号',
        prop: 'p2',
        overHidden: true,
      },
      {
        label: '核查时间',
        prop: 'p3',
        type: 'date',
        overHidden: true,
      },
      {
        label: '检查人员',
        prop: 'p4',
      },
      {
        label: '附件数量',
        prop: 'p5',
      },
      {
        label: '问题数量',
        prop: 'p6',
      },
      {
        label: '核查状态',
        prop: 'p7',
        search: true,
        overHidden: true,
        dicData: [
          {label:'草稿', value:'0'},
          {label:'未整改', value:'1'},
          {label:'已整改未审核', value:'2'},
          {label:'审核通过', value:'3'},
          {label:'审核不通 过', value:'4'},
        ],
        filterable: true,
        type: 'select',
      },
      {
        label: '备注',
        prop: 'p8',
        hide: true
      },
      {
        label: '附件',
        prop: 'p9',
        type: 'upload',
        hide: true,
        span: 24
      },
      {
        label: '问题列表',
        prop: 'p10',
        slot: true,
        hide: true,
        span: 24
      },

    ]
  }
}

export const tableOption2 = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    searchLabelWidth: 120,
    cellBtn: true,
    addRowBtn: true,
    editRowBtn: true,
    column: [
      {
        label: '问题描述',
        prop: 'p1',
        cell: true,
      },
    ]
  }
}